
import 'package:p_location/common/obj/base_filter_option.dart';

class FilterVehicleType extends BaseFilterOption {
    Object buildId;
    int containVehicleAmount;
    String createTime;
    int icon;
    int id;
    String name;
    String orgCode;
    int tenentId;
    String updateTime;
    String wheelDiameter;
    double wheelDiameterInt;

    FilterVehicleType({this.buildId, this.containVehicleAmount, this.createTime, this.icon, this.id, this.name, this.orgCode, this.tenentId, this.updateTime, this.wheelDiameter, this.wheelDiameterInt});

    factory FilterVehicleType.fromJson(Map<String, dynamic> json) {
        return FilterVehicleType(
//            buildId: json['buildId'] != null ? Object.fromJson(json['buildId']) : null,
            containVehicleAmount: json['containVehicleAmount'], 
//            createTime: json['createTime'] != null ? String?.fromJson(json['createTime']) : null,
            icon: json['icon'], 
            id: json['id'], 
            name: json['name'], 
            orgCode: json['orgCode'], 
            tenentId: json['tenentId'], 
            updateTime: json['updateTime'], 
            wheelDiameter: json['wheelDiameter'], 
            wheelDiameterInt: json['wheelDiameterInt'], 
        );
    }

    Map<String, dynamic> toJson() {
        final Map<String, dynamic> data = new Map<String, dynamic>();
        data['containVehicleAmount'] = this.containVehicleAmount;
        data['icon'] = this.icon;
        data['id'] = this.id;
        data['name'] = this.name;
        data['orgCode'] = this.orgCode;
        data['tenentId'] = this.tenentId;
        data['updateTime'] = this.updateTime;
        data['wheelDiameter'] = this.wheelDiameter;
        data['wheelDiameterInt'] = this.wheelDiameterInt;
//        if (this.buildId != null) {
//            data['buildId'] = this.buildId.toJson();
//        }
//        if (this.createTime != null) {
//            data['createTime'] = this.createTime.toJson();
//        }
        return data;
    }

  @override
  getCode() {
   return name;
  }

  @override
  getName() {
    return name;
  }
}